home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / amac33.arc / QLST13.QM < prev    next >
Text File  |  1991-04-28  |  8KB  |  186 lines

  1. *                              QLST13.QM
  2. *                   Macro To Load Files From FileList
  3. *
  4. *        @0 - Loads files from FileList, reads macfile of first file.
  5. *        @1 - Loads files from FileList, does NOT read macfile.
  6. *
  7. *
  8. * DESCRIPTION:
  9. *
  10. * QLST13.QM are macros that enables QEdit to load a list of files from
  11. * a FileList file of unlimited length. These may be two of the broadly
  12. * most useful macros so far.
  13.  
  14. * The @1 macro was written by Kyle Watkins of SemWare. @0 is a version
  15. * slightly modified by me to read the macfile of the first files in the
  16. * FileList.
  17.  
  18.  
  19. * Following is the syntex:
  20. *
  21. *            Q.EXE [d:][FileList].ql /E[d:][fileName].mac
  22. *
  23. *
  24. * For my setup and to load files pertaining to QLST.QM my command is:
  25. *
  26. *            Q  QLST.ql /Eg:\qe\QLST.mac
  27. *
  28. * I keep QLST.MAC in g:\qe.
  29. *
  30. * Any subsequent FileList I load can be loaded with the following command:
  31. *
  32. *            Q [d:][FileList].ql /Eg:\qe\QLST.mac
  33. *
  34. * Place the macro by Kyle Watkins, Alt_1, FIRST in this file if you do
  35. * NOT wish to load the macro of the first files in the FileList or the
  36. * first files in the FileList does not have a macro. Then convert this
  37. * txtfile with QMAC. You will know this is necessary when you get a
  38. * beep and the following error message when loading files:
  39. *
  40. *        "File Not Found. Press <Esc>"
  41.  
  42.  
  43. * (Other) Macros available: See ALLMACRO.INF.
  44.  
  45. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  46. *
  47. * To BEGIN, just type "START QLST" <Enter>. All pertinent files will be
  48. * loaded in the "Ring" for viewing, and QLST13.MAC is read.
  49. * Alternatively, type "START QLST 0" <Enter> and the disk copies of all
  50. * files in the "Ring" will be loaded ready for editing, saving time.
  51.  
  52. * You will see the files being loaded and when the macro completes you
  53. * should be editing this file. If you wish to load files from another
  54. * file list while QLST.mac is loaded, just load that file list in
  55. * another window and press Alt_0. Another option is to place this macro
  56. * in QCONFIG.DAT on one line and it will be available to load other
  57. * FileLists at all times while editing any file.
  58.  
  59. * You can also put the @z macro in FILExx.QM at the end of these macros
  60. * to get the job of loading files with a FileList "completely" done,
  61. * as shown at the end of the @0 macro, and also in QLST0.QM.
  62.  
  63.  
  64.  
  65. *┌────────────────────────────────────────────────────────────┐
  66. *│ @0 Load Files From FileList, Read macfile of first file    │
  67. *└────────────────────────────────────────────────────────────┘
  68. * Txtfile extensions must be only 2 letters. I use "QM". Add a
  69. * "backspace" to last line of this macro if your txfile extensions
  70. * have 3 letters.
  71. *
  72. @0 macrobegin
  73.         endfile begline                 * Get to last file first
  74.  REPEAT:                                *
  75.         Unmarkblock Markline            * Mark it
  76.         Copy                            * Copy file name to scrap
  77.         Editfile Currentfilename " "    * Load current file plus
  78.         Paste Return                    * last marked on list into ring
  79.         Cursorup                        * If another file, move up
  80.  JTrue REPEAT:                          * When no more files
  81.         nextfile macroread              * read first file macro |
  82.         currentfilename                 *                       |TH mod
  83.         backspace backspace "mac" return*                       |
  84. *
  85. ** Add lines below to load disk copy of all files in "Ring" from FileList
  86. *               (see QLST0.QM for this revised macro)
  87. *       Editfile '!' Return      * Insert -or- GoTo NUL File
  88. *       Begline Cursorright      * Put cursor in Col. 2 of NUL File
  89. *       LOOP:                    * Main test loop
  90. *           Nextfile             * Move to next files in Ring
  91. *           Cursorleft           * Move cursor left (need for NUL test)
  92. *           Jfalse LOOP:         * If couldn't move to left, it's not
  93. *                                * the NUL File AND cursor position
  94. *                                * has not changed -- LOOP again
  95. *                                *ELSE
  96. *                                * Check to see if in the NUL File
  97. *           Cursorleft           * Move cursor left for NUL Test
  98. *           Jfalse END:          * If couldn't move left -- We
  99. *                                * ARE in the NUL File and Need
  100. *                                * to END the Macro
  101. *                                *ELSE
  102. *           Cursorright          * Move back to Col. 2 in NUL File
  103. *       END:                     * Macro is DONE
  104. *           Quit                 * Quit the NUL File
  105. *
  106. * 31 bytes Tue  07-31-1990  18:30:10
  107.  
  108.  
  109.  
  110. *┌──────────────────────────────────────────────────────────────────┐
  111. *│ @1 Load Files From FileList, Does NOT Read macfile of first file │
  112. *└──────────────────────────────────────────────────────────────────┘
  113. *
  114. * Use this macro, Alt_1, if you do NOT want to load the macro of the
  115. * first files in the FileList.
  116. *
  117. * In comparing this latest macro (as written by Kyle Watkins) to one
  118. * Tim Farley wrote earlier, the following message was sent to me on the
  119. * SemWare BBS by Tim, dated 7/31/90:
  120. *
  121. ************************************************************************
  122. * COMMENTS FROM TIM FARLEY - SemWare:
  123. *
  124. *
  125. *         Here's Kyle's version (much improved over mine, I must admit) of the
  126. *         file list loading macro.  Comments added by me.
  127. *
  128. * *
  129. * * LOAD A LIST OF FILES
  130. *
  131. @1   MacroBegin
  132.      EndFile BegLine              * start at last line
  133.    REPEAT:
  134.      UnmarkBlock MarkLine Copy    * grab this name
  135.      EditFile                     * get ready to load
  136.      CurrentFilename " "          * to force return *here*
  137.      Paste Return                 * paste file name & do it!
  138.      CursorUp                     * more lines above?
  139.      JTrue REPEAT:                * if yes, repeat.
  140. *
  141. *
  142. *        Not only is this macro far smaller than mine (by almost a factor of
  143. *        2!), but it has the following advantages:
  144. *
  145. *             * faster!
  146. *             * doesn't "change" the file list file
  147. *             * still loads files in same order they are in the list
  148. *             * returns to list file with no screen "flashing"
  149. *             * takes advantage of QEdit's deferred loading of files
  150. *
  151. *        That last bit is the main advantage:  by specifying CurrentFilename
  152. *        plus a space plus the desired file name on the EditFile prompt, we
  153. *        load both the current file, plus the file we desire.  This takes
  154. *        advantage of the fact that the EditFile, just like the QEdit command
  155. *        line, can accept multiple file names together, separated by spaces.
  156. *
  157. *
  158. *        But loading the current file just returns us to the buffer we are in
  159. *        with no disk access.  So the end result is that the file from the
  160. *        list is entered in QEdit's "ring" *without* actually loading it.  It
  161. *        only loads when you try to Nextfiles into it, just as if you had
  162. *        loaded the list via a wildcard.  Neat!
  163. *
  164. *        Kyle really came up with a far better solution here.
  165. *
  166. *        --Tim Farley
  167. *
  168. *********************************************************************
  169. *
  170. * Version History:
  171. *
  172. *       1.0a - modified to include Alt_1, Changed documentation.
  173. *            - added QLST.BAT for quick startup
  174. *       1.0b - Changed name QLSTxx to QLSTxx
  175. *            - Modified QLST.BAT
  176. *       1.1  - QLST.QL was setup for my system. Correct version
  177. *              requiring no changes is in v1.1.
  178. *       1.2  - Modified documentation concerning error messages
  179. *              when loading files.
  180. *       1.2a - Modified documentation
  181. *       1.3  - Modified documentation and added START.BAT.
  182. *            - Changed QLIST file names to QLST.
  183. *            - Added option to @0 to have all files loaded in ring.
  184.  
  185. * Tom Hogshead   Sun  11-04-1990
  186.